import java.util.*;
public class TestDemo {
	public static void main(String[] args) {
		
		int count=3;
		Scanner scan=new Scanner(System.in);
		while(count!=0) {
			System.out.println("请输入密码");
			String password=scan.nextLine();
			if(password.equals("123456")) {
				System.out.println("登录成功");
				break;
			}else {
				count--;
				System.out.println("输入错误你还有"+count+"次机会！");
			}
		}
	}
	public static void main4(String[] args) {
		for(int i=0;i<100001;i++) {
		int count=0;
		int tmp=i;
		while(tmp%10!=0) {

		tmp=tmp/10;
		count++;
		}
		tmp=i;
		int num=0;
		while(tmp%10!=0) {
			num+=Math.pow(tmp%10,count);
			tmp/=10;
		}
		if(num==i) {
			System.out.println(i);
		}
	}
}
	public static void main3(String[] args) {
		int count=0;
		for(int i=1;i<101;i++) {
			if(i%10==9)
				count++;
			if(i/10==9)
				count++;
		}
		System.out.println(count);
	}
	public static void main2(String[] args) {
		double sum=0;
		int Flg=1;
		for(int i=1;i<101;i++) {
			sum+=1.0/i*Flg;
			Flg=-Flg;
		}
		System.out.println(sum);
	}
	public static void main1(String[] args) {

		Scanner scan=new Scanner(System.in);
		int a=scan.nextInt();
		int b=scan.nextInt();
		int c=0;
		while(a%b!=0) {
			c=a%b;
			a=b;
			b=c;
		}
		System.out.println(c);
	}
}